#pragma once
#include "Globals.h"
#include "Drawable.h"
//Rules:
//A button will appear only in certain states.
//A button merely triggers another state.
enum eButtonTypes
{
	B_ALWAYS,
	B_PURCHASE,
	B_ZONES
};

struct Button :public Drawable
{
//private: 
	bool		m_bisActive;
	bool		m_bWasbClicked;
	int			m_eiShowCondition;		//What state the game has to be in for the object to show up.
	int			m_eiStateTrigger;		//What state the game switches to when clicked.
	int			m_eiButtonType;			//What the nature of this button is.

	string		m_sButtonText;			//What text should be written on the button
	RECT		Location;	

//public:
	//=====CONSTRUCTORS
	Button();
	Button(float, float, float,float, int, int, string,int);
	//=====INITIALIZE
	void Initialize(LPDIRECT3DTEXTURE9);
	//=====ACCESSORS
	bool isActive()
	{
			if(m_eiShowCondition == c_eiGameState
				|| m_eiShowCondition == GS_ALWAYS)
				return true;
			return false;
	}
	int  GetType(){return m_eiButtonType;};
	bool isConstant();
	bool isType(int);
	int	 stateTrigger(){return m_eiStateTrigger;};


	void ModifyWorldState()
	{
		c_eiGameState = m_eiStateTrigger;
	}
	int ShowReq(){return m_eiShowCondition;};
	void Update();

	RECT GetRect(){return  Location;};

};

typedef vector<Button*> L_Button;
